using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace GameStateManager
{
    public enum ScreenState
    {
        TransitionOn,
        Active,
        TransitionOff,
        Hidden
    }

    public abstract class GameScreen
    {
        ScreenManager screenManager;
        ScreenState screenState = ScreenState.Active;

        #region Properties
        public ScreenManager ScreenManager
        {
            get { return screenManager; }
            internal set { screenManager = value; }
        }

        public ScreenState ScreenState
        {
            get { return screenState; }
            protected set { screenState = value; }
        }
        #endregion

        public virtual void LoadGraphicsContent(bool loadAllContent) { }

        public virtual void UnLoadGraphicsContent(bool unloadAllContent) { }

        public abstract void Draw(GameTime gameTime);

        public virtual void Update(GameTime gameTime, bool otherScreenHasFocus) { }

        public virtual void HandleInput(InputState inputState, GameTime gameTime) { }

        public void ExitScreen()
        {
            ScreenManager.RemoveScreen(this);
        }
    }
}
